package com.xinwei.service.impl;

import com.xinwei.constant.UserConstant;
import com.xinwei.entity.User;
import com.xinwei.excpetion.ManagerException;
import com.xinwei.excpetion.ManagerExceptionEnmu;
import com.xinwei.service.UserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Override
    public void login(User user) {
        if (!user.getUserName().equals(UserConstant.USERNAME) && user.getPassword().equals(UserConstant.PASSWORD)) {
            throw new ManagerException(ManagerExceptionEnmu.LOGIN_FAILED);
        }
    }
}
